﻿#ifndef BATTARYWIDGET_H
#define BATTARYWIDGET_H

#include <QDebug>
#include <QPainter>
#include <QPen>
#include <QTimer>
#include <QWidget>

class BattaryWidget : public QWidget {
   Q_OBJECT
public:
   explicit BattaryWidget(QWidget *parent = nullptr);

   void setValue(int value);
   void setPercentValue(int percent);
   void showChargeAnimate(bool isShow);
   int value() const;

signals:

public slots:

protected:
   void paintEvent(QPaintEvent *event);

private:
   int value_;
   int percent_value;
   QTimer *charge_timer_;
   int edge_;
   int diameter_;
   int pen_width_;
};

#endif // BATTARYWIDGET_H
